// @Desc:
// @CreateTime: 2020/11/3
package wx

import (
    "github.com/gin-gonic/gin"
    "mycrm.com/api"
    "mycrm.com/controller"
    "net/http"
)

// 测试获取 access_token
func TestGetAccessToken(c *gin.Context) {
    wxClient := api.NewWx()
    ok, _ := wxClient.GetAccessToken()
    resp := controller.Response{
        Status: 1,
        Msg:    "get access_token is success",
    }
    if !ok {
        resp.Status = 0
        resp.Msg = "get access_token is failed"
    }
    c.JSON(http.StatusOK, &resp)
}
